*** "Numbers and attitudes towards welfare state generosity" (Political Studies)
*** Carsten Jensen and Anthony Kevins 

** Load data file **

*Install Stata modules required for graphs:
net describe grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
net install grc1leg2.pkg
ssc install mplotoffset
ssc install blindschemes
set scheme plotplain

*Set survey weights 
svyset [pw=weight]


***Main analysis

*Appendix Table 1: Sample Size across Treatment Groups
tab amount minwage_income if benefits_too_generous~=.


**Overall treatment effects 

*Appendix Table 2: Ordered Logistic Regression for Overall Sample (see Figure 1)
svy: ologit benefits_too_generous i.minwage_income##i.amount

*Figure 1: “Benefits Too Generous”, Overall Treatment Effects 
margins minwage_income, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) 
mplotoffset, ylabel(0(0.1).7) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) 
graph export "Figure 1.pdf", replace
margins minwage_income, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

*Online Appendix Table 1: Pairwise comparisons of marginal linear predictions, overall analysis            
pwcompare minwage_income#amount, group


**Treatment effects, broken down by egalitarianism 

*Appendix Table 3: Ordered Logistic Regression, with Egalitarianism (see Figure 2)
svy: ologit benefits_too_generous i.minwage_income##i.amount##i.low_egal_irt_bin

*Figure 2: “Benefits Too Generous”, Treatment Effects based on Egalitarianism 
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("High Egalitarian Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Egalitarian Respondents.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("Stated Benefit Amount", size(small)) title("Low Egalitarian Respondents") ytitle("") saving("Low Egalitarian Respondents.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Egalitarian Respondents.gph" "Low Egalitarian Respondents.gph", legendfrom("High Egalitarian Respondents.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "Figure 2.pdf", replace

*Online Appendix Table 2: Pairwise comparisons of marginal linear predictions, analysis broken down by egalitarianism
pwcompare minwage_income#amount#low_egal_irt_bin, group


**Treatment effects, broken down by knowledge 

*Appendix Table 4: Ordered Logistic Regression, with Political Knowledge (see Figure 3)
svy: ologit benefits_too_generous i.minwage_income##i.amount##i.low_know_irt_bin 

*Figure 3: “Benefits Too Generous”, Treatment Effects based on Political Knowledge  
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1).9) yscale(titlegap(*-5)) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("", size(small)) title("High Knowledge Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Knowledge.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1).9) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("", size(small)) title("Low Knowledge Respondents") ytitle("") saving("Low Knowledge.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Knowledge.gph" "Low Knowledge.gph", legendfrom("High Knowledge.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "Figure 3.pdf", replace

*Online Appendix Table 3: Pairwise comparisons of marginal linear predictions, analysis broken down by knowledge
pwcompare minwage_income#amount#low_know_irt_bin, group


***Robustness checks 

**Exclude non-attentive: overall treatment effects 

*Online Appendix Figure 1: “Benefits Too Generous”, Overall Treatment Effects Among Respondents Who Passed Attention Check 
svy, subpop(strict_attention_check_passed): ologit benefits_too_generous i.minwage_income##i.amount
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) 
mplotoffset,  ylabel(0(0.1).7) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) 
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare
graph export "OA Figure 1.pdf", replace


**Exclude non-attentive: treatment effects, broken down by egalitarianism 

*Online Appendix Figure 2: “Benefits Too Generous”, Treatment Effects based on Egalitarianism Among Respondents Who Passed Attention Check 
svy, subpop(strict_attention_check_passed): ologit benefits_too_generous i.minwage_income##i.amount##i.low_egal_irt_bin
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("High Egalitarian Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Egalitarian Respondents.gph", replace)
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("Stated Benefit Amount", size(small)) title("Low Egalitarian Respondents") ytitle("") saving("Low Egalitarian Respondents.gph", replace)
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Egalitarian Respondents.gph" "Low Egalitarian Respondents.gph", legendfrom("High Egalitarian Respondents.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "OA Figure 2.pdf", replace


**Exclude non-attentive: treatment effects, broken down by knowledge 

*Online Appendix Figure 3: “Benefits Too Generous”, Treatment Effects based on Political Knowledge Among Respondents Who Passed Attention Check 
svy, subpop(strict_attention_check_passed): ologit benefits_too_generous i.minwage_income##i.amount##i.low_know_irt_bin 
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1)1) yscale(titlegap(*-5)) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("", size(small)) title("High Knowledge Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Knowledge.gph", replace)
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1)1) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("", size(small)) title("Low Knowledge Respondents") ytitle("") saving("Low Knowledge.gph", replace)
margins minwage_income if strict_attention_check_passed==0, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Knowledge.gph" "Low Knowledge.gph", legendfrom("High Knowledge.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "OA Figure 3.pdf", replace


**Controls for vulnerability: overall treatment effects 

*Online Appendix Figure 4: “Benefits Too Generous”, Overall Treatment Effects with Controls
svy: ologit benefits_too_generous i.minwage_income##i.amount i.profile_education_level_recode i.profile_gross_household i.profile_govregnew i.benefit_income
margins minwage_income, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) 
mplotoffset, ylabel(0(0.1).7) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("Benefits Too Generous.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare
graph export "OA Figure 4.pdf", replace


**Controls for vulnerability: treatment effects, broken down by egalitarianism 

*Online Appendix Figure 5: “Benefits Too Generous”, Treatment Effects based on Egalitarianism with Controls 
svy: ologit benefits_too_generous i.minwage_income##i.amount##i.low_egal_irt_bin i.profile_education_level_recode i.profile_gross_household i.profile_govregnew i.benefit_income
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("Stated Benefit Amount", size(small)) title("High Egalitarian Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Egalitarian Respondents.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("Stated Benefit Amount", size(small)) title("Low Egalitarian Respondents") ytitle("") saving("Low Egalitarian Respondents.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_egal_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Egalitarian Respondents.gph" "Low Egalitarian Respondents.gph", legendfrom("High Egalitarian Respondents.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "OA Figure 5.pdf", replace

**Controls for vulnerability: treatment effects, broken down by knowledge 

*Online Appendix Figure 6: “Benefits Too Generous”, Treatment Effects based on Political Knowledge with Controls 
svy: ologit benefits_too_generous i.minwage_income##i.amount##i.low_know_irt_bin i.profile_education_level_recode i.profile_gross_household i.profile_govregnew i.benefit_income
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1)1) yscale(titlegap(*-5)) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(order(3 "No Minimum Wage Information" 4 "Minimum Wage Information") rows(1) si(vsmall) keygap(*.5) colgap(*.5) position(6) region(lcolor(gs10) fc(none) ls(none))) xtitle("", size(small)) title("High Knowledge Respondents") ytitle("Pr(Agreeing or Strongly Agreeing)", size(small)) saving("High Knowledge.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(0)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare 

margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5)))
mplotoffset, ylabel(0(0.1)1) level(95) offset(0.1) recast(scatter) plot1opts(msymbol(D) color(*.5)) plot2opts(msymbol(O) color(black)) ci1opts(color(*.5)) ci2opts(color(black)) legend(off) xtitle("", size(small)) title("Low Knowledge Respondents") ytitle("") saving("Low Knowledge.gph", replace)
margins minwage_income, at(amount=(1 2 3 4 5) low_know_irt_bin=(1)) expression(predict(outcome(4))+predict(outcome(5))) pwcompare

grc1leg2 "High Knowledge.gph" "Low Knowledge.gph", legendfrom("High Knowledge.gph") ycommon row(1) title("") iscale(.8) imargin(0 1.2 0)
graph export "OA Figure 6.pdf", replace
